package proxy4jdbc3.solutions;

import proxy4jdbc3.JDBCReporter;
import proxy4jdbc3.jdbc.DriverProxy;

public class SQLServerDriverDriverProxy extends DriverProxy {

	public SQLServerDriverDriverProxy() {//must have a default constructor
	}

	static {//must register the driver in DriverManager at load time
		register(new SQLServerDriverDriverProxy());
	}

	@Override
	public String getDriverClassName() {
		return "com.microsoft.jdbc.sqlserver.SQLServerDriver";
	}

	public JDBCReporter getReporter() {
		return new JDBCReporter() {
			public void reportUpdate(String sql) {
				System.out.println("SQlServer updating... " + sql);

			}
			public void reportExecute(String sql) {
				System.out.println("SQlServer Server executing... " + sql);
			}

			public void reportQuery(String sql) {
				System.out.println("SQlServer querying... " + sql);
			}

		};
	}

}
